// tabBarComponent/tabBar.js
const app = getApp();
Component({
  /**
   * 组件的属性列表
   */
  properties: {
    tabbar: {
      type: Object,
      value: {
        "backgroundColor": "#ffffff",
        "color": "#999999",
        "selectedColor": "#312C2F",
        "list": [{
            "pagePath": "/pages/index/index",
            "iconPath": "/images/index.png",
            "selectedIconPath": "/images/index_on.png",
            "text": "首页"
          },
          {
            "pagePath": "/pages/goods/category",
            "iconPath": "/images/fenlei.png",
            "selectedIconPath": "/images/fenlei_on.png",
            "text": "分类"
          },
          // {
          //   "pagePath": "/pages/topic/index",
          //   "iconPath": "/images/huodong_tab.png",
          //   "isSpecial": true,
          //   "text": "活动专区"
          // },
          {
            "pagePath": "/pages/cart/index",
            "iconPath": "/images/gouwu.png",
            "selectedIconPath": "/images/gouwu_on.png",
            "text": "购物车"
          },
          {
            "pagePath": "/pages/user/index",
            "iconPath": "/images/user.png",
            "selectedIconPath": "/images/user_on.png",
            "text": "我的"
          }
        ]
      }
    }
  },

  /**
   * 组件的初始数据
   */
  data: {
    isIphoneX: app.globalData.model.search('iPhone X') != -1 ? true : false,
  },

  /**
   * 组件的方法列表
   */
  methods: {


  },
  attached: function () {
    //console.log(this.properties.num, this.properties.tabbar.list) //可以获取父组件传过来的值
  },

})